<?php
session_start();
$loginId=$_SESSION['loginid'];
$name=$_SESSION['name'];
$userType=$_SESSION['user_type'];
$typeScheme=$_SESSION['type_scheme'];

include("config.php");
$loc_id=$_REQUEST['addloc'];
$code=$_REQUEST['code'];

$reference_id=$_REQUEST['referenceId'];
if($code==1)
{
$type_view="Submersible";
}
if($code==2)
{
$type_view="Mono Block";
}
if($code==3)
{
$type_view="Centrifugal";
}
if($code==4)
{
$type_view="Single Phase";
}
?>
<script type="text/javascript" src="js/jquery.js"></script>

<script language="javascript">
function setReadOnly22(valobj)
{
		//document.getElementById('household'+obj).style.backgroundcolor="#eeeeee";
		//document.getElementById('population_sc1').readonly=1;
		//document.getElementById('population_sc1').value="Not Applicable";
		document.getElementById('yeildMin').disabled=true;
		document.getElementById('yeildMax').disabled=true;
		document.getElementById('waterMin').disabled=true;
		document.getElementById('waterMax').disabled=true;
		//document.getElementById('source'+obj).disabled=true;
		document.getElementById('source_status').value="defunct";
   
}
function setEnable22(valobj)
{

		//document.getElementById('population_sc1').style.backgroundcolor="#ffffff";
		//document.getElementById('population_sc1').readonly=0;
		//document.getElementById('population_sc1').value="";
		document.getElementById('yeildMin').disabled=false;
		document.getElementById('yeildMax').disabled=false;
		document.getElementById('waterMin').disabled=false;
		document.getElementById('waterMax').disabled=false;
		//document.getElementById('source'+obj).disabled=false;
		document.getElementById('source_status').value="operation";
	
}

</script>
 <div class="section_format">
  <form action="asset_new_add.php" method="post" name="sec5" id="sec5" onsubmit="return sec5_val();">
   <div style="height:30px" align="center"><?php echo $reference_id;?></div>
   <table border="1">
    <tr bgcolor="#CCCCCC">
      <td colspan="2">&nbsp;<b><?php echo $type_view;?></b>&nbsp;</td>
      </tr>
   
     <tr>
       <td>&nbsp;<b>Location</b>
	   <input type="hidden" name="frmId" id="frmId" value="<?php echo $loc_id;?>" />
	  <input type="hidden" name="loginId" id="loginId" value="<?php echo $loginId;?>" />
	  <input type="hidden" name="name" id="name" value="<?php echo $name;?>" />
	  <input type="hidden" name="userType" id="userType" value="<?php echo $userType;?>" />
	  <input type="hidden" name="typeScheme" id="typeScheme" value="<?php echo $typeScheme;?>" />
	   
	   </td>
      <td>&nbsp;<input type="text" name="Location" id="Location" value="" /><input type="hidden" id="sourceId" name="sourceId" value=""></td>
      </tr>
    
	  <tr>
      <td>&nbsp;<b>Latitude</b></td>
      <td>&nbsp;<input type="text" name="Latitude" id="Latitude" value="" onBlur="float1(this,20,32);" /></td>
      </tr>
      <tr>
      <td>&nbsp;<b>Longitude</b></td>
      <td>&nbsp;<input type="text" name="Longitude" id="Longitude" value="" onBlur="float1(this,67,80);" /></td>
      </tr>
   
      <td width="400">&nbsp;<b>Status</b></td>
      <td width="400">&nbsp;
	  
	  <select name="Status" id="Status">
	  <option  value="0">Select Status</option>
	  <option value="operational">Operational</option>
	  <option value="nonoperational">Non Operational</option>
	   <option value="standby">Standby</option>
	  </select>
	  <input type="hidden" id="loc_id" name="loc_id" value="<?php echo $loc_id; ?>">
	  <input type="hidden" id="code" name="code" value="<?php echo $code; ?>">
	  </td>
      </tr>
    
    <tr>
      <td>&nbsp;<b>Discharge (lpm)</b></td>
      <td>&nbsp;<input type="text" name="Discharge" id="Discharge" /></td>
      </tr>
	  
	  <tr>
      <td>&nbsp;<b>Head (m)</b></td>
      <td>&nbsp;<input type="text" name="Head" id="Head" /></td>
      </tr>
	  <tr>
      <td>&nbsp;<b>Power Rating (in HP)</b></td>
      <td>&nbsp;<input type="text" name="Power" id="Power" /></td>
      </tr>
	  <!--
	    <tr bgcolor="#999999">
	    <td colspan="2"><b>Water Quality Parameter</b></td>
      </tr>
	   <tr>
      <td>&nbsp;<b>pH</b></td>
      <td>&nbsp;<input type="text" name="pH" id="pH" value="" /></td>
      </tr>
	   <tr>
      <td>&nbsp;<b>TDS (mg/l)</b></td>
      <td>&nbsp;<input type="text" name="TDS" id="TDS" value="" /></td>
      </tr>
	   <tr>
      <td>&nbsp;<b>cl (mg/l)</b></td>
      <td>&nbsp;<input type="text" name="cl" id="cl" value="" /></td>
      </tr>
	   <tr>
      <td>&nbsp;<b>F (mg/l)</b></td>
      <td>&nbsp;<input type="text" name="F" id="F" value="" /></td>
      </tr>
	   <tr>
      <td>&nbsp;<b>NO<sub>3</sub> (mg/l)</b></td>
      <td>&nbsp;<input type="text" name="no3" id="no3" value="" /></td>
      </tr>
	  <tr>

	  -->
	  <tr>
	    <td colspan="2" align="center"><input type="submit" value="ADD ASSET" name="submit" style="font-size: 8pt; font-family: Verdana; border-style: solid; border-width: 1px; font-weight:bold; background:#666666; color:#FFFFFF; width:140px; height:30px" onClick="view_validate()"></td>
  </tr>
  </table>
  </form>
  </div>